﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ClassLibrary.Entitty;
using ClassLibrary.DAO;

public partial class Gioi_thieu : System.Web.UI.Page
{
    TblInforDAO inforDAO = new TblInforDAO(Global.CONNECTION_STRING);
    TblNoiDungDAO noidungDAO = new TblNoiDungDAO(Global.CONNECTION_STRING);

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadInfo();
        }

    }
    private void loadTieuDeNoiDungTrang()
    {
        string id = Request.QueryString["id"];
        if (id == null)
        {
            DataTable noidung = noidungDAO.getTieuDe_ByID(1, 1);
            foreach (DataRow dr in noidung.Rows)
            {
                lbThongtin.Text = Server.HtmlDecode(dr["Noidung"].ToString());
            }
        }
        else
        {
            DataTable noidung = noidungDAO.getTieuDe_ByID(Global.ConvertToInt(id), 1);
            foreach (DataRow dr in noidung.Rows)
            {
                lbThongtin.Text = Server.HtmlDecode(dr["Noidung"].ToString());
            }
        }
    }
    private void LoadInfo()
    {      
            TblInformaton dt = inforDAO.GetInfo_ByMenu(8,18);
            lbThongtin.Text = Server.HtmlDecode(dt.Information);
    }
}
